﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using KL.UFrame.Core.Result;
using KL.UFrame.Data.Models;

namespace KL.UFrame.Data.Business
{
    public interface IPerformanceBusiness
    {
        Task<int> CreateAsync(PerformanceModel model);

        Task<int> UpdateAsync(PerformanceModel model);

        Task<bool> SetContentAsync(int id, string content);

        Task<bool> DeleteAsync(int id);

        Task<bool> ResumeAsync(int id);

        Task<ResultMessage<List<PerformanceModel>>> SearchAsync(string title, DateTime start, DateTime end,
            int pageIndex,
            int pageSize);

        Task<List<PerformanceModel>> GetAllPerformancesAsync();

        Task<PerformanceModel> GetAsync(int id);

        Task<bool> SubscribeAsync(int performanceId, string openId);

        Task<bool> UnsubscribeAsync(int performanceId, string openId);

        Task<ResultMessage<List<SubscribingModel>>> SearchSubscribingsAsync(int performanceId,
            DateTime start, DateTime end, int pageIndex, int pageSize);
    }
}